package com.venus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 角色模块表 role_module
 * </p>
 *
 * @author Venus
 * @since 2020-06-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RoleModule extends Model<RoleModule> {

    private static final long serialVersionUID = 1L;

    /**
     * 角色模块id
     */
    @TableId(value = "rm_id", type = IdType.AUTO)
    private Integer rmId;

    /**
     * 角色id
     */
    private Integer roleId;

    /**
     * 模块id
     */
    private Integer modId;

    public RoleModule(Integer roleId, Integer modId) {
        super();
        this.roleId = roleId;
        this.modId = modId;
    }


    @Override
    protected Serializable pkVal() {
        return this.rmId;
    }

}
